import axios from "axios";
let uri = "http://127.0.0.1:3355"

export let request ={
    get:function (url){
        return axios.get(uri+url);
    },
    post:function (url,data){
        return axios.post(uri+url,data);
    },
    getWithToken:function (url){
        return axios.get(uri+url,{
            headers:{
                Authorization:localStorage.getItem("token")
            }
        })
    },
    postWithToken:function (url,data){
        return axios.post(uri+url,data,{
            headers:{
                Authorization:localStorage.getItem("token")
            }
        })
    }
}